﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;

namespace ComicViewer.IManhua
{
    public class ComicPage : System.ComponentModel.INotifyPropertyChanged
    {
        public int Index { get; set; }
        public string Id { get; set; }
        public Uri PicUri { get; set; }
        public Uri PicUriPng { get; set; }
        public string ReferUrl { get; set; }
        public ComicPage Prev { get; set; }
        public ComicPage Next { get; set; }

        private ImageSource m_source;
        public ImageSource Source
        {
            get
            {
                return m_source;
            }
            set
            {
                if (m_source != value)
                {
                    m_source = value;
                    RaisePropertyChanged("Source");
                }
            }
        }

        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

        private void RaisePropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
